package com.globallogic.university.events;

import com.globallogic.university.people.StudentGroup;
import com.globallogic.university.people.Teacher;
import com.globallogic.university.subject.Subject;
import com.globallogic.university.venues.Auditorium;

/**
 * Class represents a lecture.
 * 
 * @author vladyslav.bachurin
 *
 */
public class Lecture extends Event {


	public Lecture() {
		super();
	}

	public Lecture(StudentGroup group, DaysOfWeek dayOfWeek,
			Integer timeSlotNumber, Auditorium auditorium, Subject subject,
			Teacher lecturer) {
		super(group, dayOfWeek, timeSlotNumber, auditorium, subject, lecturer);
	}

	@Override
	public String toString() {
		return "Lecture: " + super.toString();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result
				+ ((materials == null) ? 0 : materials.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Lecture other = (Lecture) obj;
		if (materials == null) {
			if (other.materials != null)
				return false;
		} else if (!materials.equals(other.materials))
			return false;
		return true;
	}

	private String materials;

	public String getMaterials() {
		return materials;
	}

	public void setMaterials(String materials) {
		this.materials = materials;
	}

}
